#include <stdio.h>
#include <stdbool.h>
#include <string.h>

int main() {
    char str[101];
    int len = 0;
    bool isPalindrome = true;

    // 输入提示信息
    printf("Please input a string:");

    // 读取输入的字符串
    char c = getchar();
    while (c != '\n' && len < 100) {
        str[len++] = c;
        c = getchar();
    }
    str[len] = '\0'; // 添加字符串结束符

    // 判断是否为回文
    for (int i = 0; i < len / 2; i++) {
        if (str[i] != str[len - i - 1]) {
            isPalindrome = false;
            break;
        }
    }

    // 输出结果
    if (isPalindrome) {
        printf("It is a palindrome.\n");
    } else {
        printf("It is not a palindrome.\n");
    }

    return 0;
}
